Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom package with dimensions field #12584

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

atorresveiga
Copy link
Contributor

@atorresveiga atorresveiga commented Sep 11, 2024

⚠️ Depends on this FluxC PR
Closes: #12528

Description

This PR fixes the crash we were facing when using the new shipping labels extension. It uses a FluxC version that considers the API response's new dimensions field.

Steps to reproduce the behavior:

  1. Enable Shipping labels on the app or log into a site that has shipping labels enabled
  2. Follow the steps from the screen recording below and see if the app crashes with the following stacktrace (We need a custom package with the new dimensions field):
CrashCreatingShippingLabel.mp4

Expected behavior
The app should not crash when attempting to add package details

Testing information

  1. Run the same steps from the video above to ensure the app doesn't crash.

The tests that have been performed

  1. Checked that packages with the new dimensions field does not break the app
  2. Checked that packages with the inner-dimensions and outer-dimensions fields does not break the app

Images/gif

Screen_recording_20240911_122112.mp4
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@atorresveiga atorresveiga added type: crash The worst kind of bug. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Sep 11, 2024
@atorresveiga atorresveiga added this to the 20.4 milestone Sep 11, 2024
@atorresveiga atorresveiga changed the title update FluxC version Custom package with dimensions field Sep 11, 2024
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 20.4. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 11, 2024

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitf7b8fdc
Direct Downloadwoocommerce-wear-prototype-build-pr12584-f7b8fdc.apk

@wpmobilebot
Copy link
Collaborator

Found 1 violations:

The PR caused the following dependency changes:

expand

-+--- org.wordpress:fluxc:trunk-884fbb8e16259765bb490127476813962e92a113
-|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.25
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
-|    +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6
-|    |    \--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
-|    +--- androidx.security:security-crypto:1.0.0 -> 1.1.0-alpha03
-|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
-|    |    +--- com.google.crypto.tink:tink-android:1.5.0
-|    |    \--- androidx.collection:collection:1.1.0 -> 1.4.0 (*)
-|    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0
-|    |    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.10 (*)
-|    +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-|    +--- org.apache.commons:commons-text:1.10.0 (*)
-|    +--- androidx.room:room-runtime:2.6.1 (*)
-|    +--- androidx.room:room-ktx:2.6.1
-|    |    +--- androidx.room:room-common:2.6.1 (*)
-|    |    +--- androidx.room:room-runtime:2.6.1 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*)
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 -> 1.8.1 (*)
-|    |    +--- androidx.room:room-common:2.6.1 (c)
-|    |    \--- androidx.room:room-runtime:2.6.1 (c)
-|    +--- com.google.dagger:dagger:2.51.1
-|    |    \--- javax.inject:javax.inject:1
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
-|    +--- org.wordpress:wellsql:2.0.0
-|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
-|    |    \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
-|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-884fbb8e16259765bb490127476813962e92a113
-|    +--- org.greenrobot:eventbus-java:3.3.1
-|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
-|    +--- com.android.volley:volley:1.1.1 -> 1.2.0
-|    +--- androidx.paging:paging-runtime:2.1.2
-|    |    +--- androidx.paging:paging-common:2.1.2
-|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.8.0 (*)
-|    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
-|    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
-|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.7.0 (*)
-|    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.7.0 (*)
-|    |    \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
-|    +--- com.goterl:lazysodium-android:5.0.2
-|    +--- net.java.dev.jna:jna:5.5.0
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
++--- org.wordpress:fluxc:trunk-a6a3b2f63527677907a15cd44425402eefb0fc6d FAILED
-+--- org.wordpress.fluxc.plugins:woocommerce:trunk-884fbb8e16259765bb490127476813962e92a113
-|    +--- org.wordpress:fluxc:trunk-884fbb8e16259765bb490127476813962e92a113 (*)
-|    +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-|    +--- com.google.dagger:dagger:2.51.1 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
-|    +--- androidx.room:room-runtime:2.6.1 (*)
-|    +--- org.wordpress:wellsql:2.0.0 (*)
-|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-884fbb8e16259765bb490127476813962e92a113
-|    +--- androidx.room:room-ktx:2.6.1 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
++--- org.wordpress.fluxc.plugins:woocommerce:trunk-a6a3b2f63527677907a15cd44425402eefb0fc6d FAILED
 +--- org.wordpress:login:1.18.0
 |    +--- com.github.bumptech.glide:glide:4.12.0 -> 4.16.0
-|    |    \--- androidx.exifinterface:exifinterface:1.3.6 (*)
+|    |    \--- androidx.exifinterface:exifinterface:1.3.6
+|    |         \--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
-|    \--- com.google.dagger:dagger:2.47 -> 2.51.1 (*)
+|    \--- com.google.dagger:dagger:2.47 -> 2.51.1
+|         \--- javax.inject:javax.inject:1
 +--- project :libs:cardreader
 |    +--- com.stripe:stripeterminal-localmobile:3.7.1
-|    |    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24
+|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 1.9.25 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.24
+|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 1.9.25 (*)
 |    |    +--- com.stripe:stripeterminal-external:3.7.1
-|    |    |    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|    |    |    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 (*)
 |    |    |    \--- com.stripe:stripeterminal-internal-models:3.7.1
-|    |    |         \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|    |    |         \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 (*)
 |    |    \--- com.stripe:stripeterminal-internal-common:3.7.1
-|    |         \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 (*)
 |    +--- com.stripe:stripeterminal-core:3.7.1
-|    |    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 (*)
-|    |    +--- androidx.security:security-crypto:1.1.0-alpha03 (*)
+|    |    +--- androidx.security:security-crypto:1.1.0-alpha03
+|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
+|    |    |    +--- com.google.crypto.tink:tink-android:1.5.0
+|    |    |    \--- androidx.collection:collection:1.1.0 -> 1.4.0 (*)
-|    |    \--- androidx.room:room-ktx:2.6.1 (*)
+|    |    \--- androidx.room:room-ktx:2.6.1
+|    |         +--- androidx.room:room-common:2.6.1 (*)
+|    |         +--- androidx.room:room-runtime:2.6.1 (*)
+|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*)
+|    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 -> 1.8.1 (*)
+|    |         +--- androidx.room:room-common:2.6.1 (c)
+|    |         \--- androidx.room:room-runtime:2.6.1 (c)
-|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 -> 1.9.25 (*)
+|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 -> 1.9.24 (*)
 +--- com.automattic:about:0.0.6
-|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.5.31 -> 1.9.25 (*)
+|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.5.31 -> 1.9.24 (*)
 +--- org.wordpress:mediapicker:0.3.1
-|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 (*)
 |    \--- org.wordpress.mediapicker:domain:0.3.1
-|         \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|         \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 (*)
 +--- org.wordpress.mediapicker:source-wordpress:0.3.1
-|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 -> 1.9.25 (*)
+|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.24 (*)
 +--- io.coil-kt:coil-compose:2.1.0
 |    \--- io.coil-kt:coil-compose-base:2.1.0
 |         \--- io.coil-kt:coil-base:2.1.0
-|              \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10 -> 1.9.25 (*)
+|              \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10 -> 1.9.24 (*)
-\--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 -> 1.9.25 (*)
+\--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 -> 1.9.24 (*)

Please review and act accordingly

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitf7b8fdc
Direct Downloadwoocommerce-prototype-build-pr12584-f7b8fdc.apk

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.63%. Comparing base (589df25) to head (f7b8fdc).
Report is 3 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #12584   +/-   ##
=========================================
  Coverage     40.62%   40.63%           
- Complexity     5669     5670    +1     
=========================================
  Files          1228     1228           
  Lines         68944    68944           
  Branches       9549     9549           
=========================================
+ Hits          28010    28013    +3     
+ Misses        38357    38355    -2     
+ Partials       2577     2576    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@atorresveiga atorresveiga merged commit a136c68 into trunk Sep 11, 2024
14 checks passed
@atorresveiga atorresveiga deleted the issue/12528-new-dimensions-field branch September 11, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: shipping labels Related to creating, ordering, or printing shipping labels. type: crash The worst kind of bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NumberFormatException: empty String
4 participants